package com.ruoyi.project.module.categoryinfo.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.categoryinfo.mapper.CategoryinfoMapper;
import com.ruoyi.project.module.categoryinfo.domain.Categoryinfo;
import com.ruoyi.project.module.categoryinfo.service.ICategoryinfoService;
import com.ruoyi.common.support.Convert;

/**
 * 菜单 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-11
 */
@Service
public class CategoryinfoServiceImpl implements ICategoryinfoService 
{
	@Autowired
	private CategoryinfoMapper categoryinfoMapper;

	/**
     * 查询菜单信息
     * 
     * @param id 菜单ID
     * @return 菜单信息
     */
    @Override
	public Categoryinfo selectCategoryinfoById(Integer id)
	{
	    return categoryinfoMapper.selectCategoryinfoById(id);
	}
	
	/**
     * 查询菜单列表
     * 
     * @param categoryinfo 菜单信息
     * @return 菜单集合
     */
	@Override
	public List<Categoryinfo> selectCategoryinfoList(Categoryinfo categoryinfo)
	{
	    return categoryinfoMapper.selectCategoryinfoList(categoryinfo);
	}
	
    /**
     * 新增菜单
     * 
     * @param categoryinfo 菜单信息
     * @return 结果
     */
	@Override
	public int insertCategoryinfo(Categoryinfo categoryinfo)
	{
	    return categoryinfoMapper.insertCategoryinfo(categoryinfo);
	}
	
	/**
     * 修改菜单
     * 
     * @param categoryinfo 菜单信息
     * @return 结果
     */
	@Override
	public int updateCategoryinfo(Categoryinfo categoryinfo)
	{
	    return categoryinfoMapper.updateCategoryinfo(categoryinfo);
	}

	/**
     * 删除菜单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCategoryinfoByIds(String ids)
	{
		return categoryinfoMapper.deleteCategoryinfoByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<Categoryinfo> SelectLan() {
		return categoryinfoMapper.SelectLan();
	}

	@Override
	public List<Categoryinfo> SelectType() {
		return categoryinfoMapper.SelectType();
	}

	@Override
	public List<Categoryinfo> SelectName() {
		return categoryinfoMapper.SelectName();
	}

}
